
#include <iostream>
#include <string>
#include <memory>

#include "HttpServer.hpp"

void Usage(std::string proc)
{
    std::cout << "\r\nproc: " << "[port+]\r\n" << std::endl;
}

// ./httpserver port
int main(int argc, char* argv[])
{
    if(argc != 2){
        Usage(argv[0]);
        exit(1);
    }
    int port = atoi(argv[1]);

    std::unique_ptr<HttpServer> http_server(new HttpServer(port));
    http_server->InitHttpServer();
    http_server->Loop();

    return 0;
}

